import BASE_URLS from "@/api/config.js"
import http from "@/utils/http.js"
const tradeService = {
	//司机-车辆管理-查询列表
	carList: function() {

		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/baseinfo/driver/query/car/list",
			data: {},
			method: "GET",
			header: {
				"content-type": "application/x-www-form-urlencoded",
				"token": uni.getStorageSync("token")
			}
		});
	},
	//司机-车辆管理-保存
	carSave: function(param) {


		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/baseinfo/car/save",
			data: param,
			method: "POST",
			header: {
				"content-type": "application/json",
				"token": uni.getStorageSync("token")
			}
		});
	},
	//司机-车辆管理-详情
	carDetail: function(id) {


		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/baseinfo/car/query/detail",
			data: {
				id: id
			},
			method: "GET",
			header: {
				"content-type": "application/x-www-form-urlencoded",
				"token": uni.getStorageSync("token")
			}
		});
	},
	//司机-车辆管理-删除
	carDelete: function(id) {


		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/baseinfo/car/delete",
			data: {
				id: id
			},
			method: "GET",
			header: {
				"content-type": "application/x-www-form-urlencoded",
				"token": uni.getStorageSync("token")
			}
		});
	},
	//司机-获取可用车辆下拉框
	carDropDown: function() {


		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/baseinfo/driver/query/car/dropdown",
			data: {},
			method: "GET",
			header: {
				"content-type": "application/x-www-form-urlencoded",
				"token": uni.getStorageSync("token")
			}
		});
	},
	//	司机-物流-列表
	transportList: function() {

		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/transport/driver/query/list",
			data: {},
			method: "GET",
			header: {
				"content-type": "application/x-www-form-urlencoded",
				"token": uni.getStorageSync("token")
			}
		});
	},
	//	司机-物流-发车
	transportStart: function(param) {

		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/transport/driver/start",
			data: param,
			method: "POST",
			header: {
				"content-type": "application/x-www-form-urlencoded",
				"token": uni.getStorageSync("token")
			}
		});
	},
	//	司机-物流-详情
	transportDetail: function(id) {

		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/transport/query/detail",
			data: {
				id: id
			},
			method: "GET",
			header: {
				"content-type": "application/x-www-form-urlencoded",
				"token": uni.getStorageSync("token")
			}
		});
	},
	//	司机-物流-判级图片上传
	transportUploadJudgePic: function(param) {

		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/transport/driver/upload/judge/pic",
			data: param,
			method: "POST",
			header: {
				"content-type": "application/x-www-form-urlencoded",
				"token": uni.getStorageSync("token")
			}
		});
	},
	//	司机-物流-费用图片上传
	transportUploadCostPic: function(param) {

		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/transport/driver/upload/cost/pic",
			data: param,
			method: "POST",
			header: {
				"content-type": "application/x-www-form-urlencoded",
				"token": uni.getStorageSync("token")
			}
		});
	},
	//	OSS签名
	getOssPolicy: function() {

		return http.request({
			url: BASE_URLS.DEFAULT_BASE_URL + "/file/get/policy",
			method: "GET",
			header: {
				"token": uni.getStorageSync("token")
			}
		});
	},

}
export default tradeService;
